/**
 * LibManMain.java
 *
 * @author:  John Thomason
 *  Course:  CS223
 *  Assign:  Final Exam
 * Seminar:  6
 *    Date:  Feb 16, 2009
 */

// Assigned Package
package libman;

// Package Imports
import java.awt.*;
import libman.gui.*;
import javax.swing.*;

/**
 * LibManMain Class
 */
public class LibManMain
{
    //Instance Vars
    public static GraphicsEnvironment   ge;
    public static GraphicsDevice        gd;
    public static GraphicsConfiguration gc;
    public static Rectangle             r;
    public static double                screenWidth,
                                        screenHeight;

    /** Construct a LibManMain App */
    public LibManMain(){
        
        //Static Application Variables
        ge           = GraphicsEnvironment.getLocalGraphicsEnvironment();
        gd           = ge.getDefaultScreenDevice();
        gc           = gd.getDefaultConfiguration();
        r            = gc.getBounds();
        screenWidth  = r.getWidth();
        screenHeight = r.getHeight();

        //Try to set the local look and feel
        try {

            UIManager.setLookAndFeel(
            UIManager.getSystemLookAndFeelClassName());

        }//try

        catch (Exception e){
            //Don't do anything...
            System.out.println("INFO: Could not set the default look and " +
                               "feel to the local Operating System.");
        }//catch

        //Create the Library Manager Window in the Event Thread.
        SwingUtilities.invokeLater(new Runnable() {

            public void run() {
                new LibManWin();
            }//run

        });//invokeLater()

    }//LibManMain Constructor

    /**
     * main()
     * @param args the command line arguments
     */
    public static void main(String[] args)
    {
        new LibManMain();
    }//main()

}//LibManMain Class
